<template>
  <div class="table-container">
    <Promblem>
      <template v-slot:custom-slot>
        <el-button style="margin-left: 0px" type="success" @click="handleAdd">添加题目</el-button>
      </template>
      <template v-slot:actions="{ row }">
        <el-button plain type="primary" size="small" @click="editRow(row)">编辑</el-button>
        <el-button plain type="danger" size="small" @click="disableRow(row)">禁用</el-button>
      </template>
    </Promblem>
  </div>
</template>
<style scoped>
.table-container {
  width: 100%;
  height: 100%;
  margin: 1.5vh auto;
}




</style>
<script lang="ts" setup>
import router from "@/router";
import Promblem from "@/components/ProblemLib/Promblem.vue";

const handleAdd = () => {
  router.push('/student/oj/UploadProblem');
};

</script>

